package com.ItTallents.Maria.Nikola.Ivan.cardsgame;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MenuActivity extends Activity implements OnClickListener {

	private Button start;
	private Button highScores;
	private Button options;
	private Button help;
	private Button logOut;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		
		setContentView(R.layout.activity_menu);
		
		start = (Button) findViewById(R.id.Start);
		highScores = (Button) findViewById(R.id.HighScores);
		options = (Button) findViewById(R.id.Options);
		help = (Button) findViewById(R.id.Help);
		logOut = (Button) findViewById(R.id.Logout);
		
		
		start.setOnClickListener(this);
		highScores.setOnClickListener(this);
		options.setOnClickListener(this);
		help.setOnClickListener(this);
		logOut.setOnClickListener(this);
	}

	public void onClick(View v) {
		int id = v.getId();

		if (id == start.getId()) {
			startActivity(new Intent(this, StartActivity.class));
		}

		if (id == highScores.getId()) {
			startActivity(new Intent(this, HighScoresActivity.class));
		}

		if (id == options.getId()) {
			startActivity(new Intent(this, OptionsActivity.class));
		}

		if (id == help.getId()) {
			startActivity(new Intent(this, HelpActivity.class));
		}

		if (id == logOut.getId()) {
			startActivity(new Intent(this, LogInActivity.class));
		}
	}
}
